package com.minelx.woods.pc.service;

import com.minelx.httpclient.core.request.IResponse;
import com.minelx.woods.pc.service.mapper.TaskRequestMapper;

public class TaskService {
	private final TaskRequestMapper taskRequestMapper;

	private final String token;

	public TaskService(TaskRequestMapper taskRequestMapper, String token) {
		this.taskRequestMapper = taskRequestMapper;
		this.token = token;
	}

	public IResponse getTask(String taskId) {
		return taskRequestMapper.requestGetTask(token, taskId);
	}

	public IResponse postDownloadRequest(String taskId) {
		return taskRequestMapper.requestPostDownloadRequest(token, taskId);
	}

	public IResponse downloadTask(String requestId) {
		return taskRequestMapper.requestDownloadTask(token, requestId);
	}
}
